/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$("#messageaddbtn").click(function() {
    var ts = $(this);
    ts.attr("disabled", true);
    var msg = $("#messageadd").val();
    var vcode = $("[name=vcode]").val();
    $.post(url + "/shopmessage/add.html", {msg: msg, go: shopid, vcode: vcode}, function(data) {
        if (data.success) {
            alert("回复成功!");
        } else {
            alert("留言失败：" + data.msg);
            ts.attr("disabled", false);
        }
    }, "json");
});
$("#errorclose").click(function() {
    $(this).parent("div").remove();
});
function changeAuthCode() {
    var num = new Date().getTime();
    var rand = Math.round(Math.random() * 10000);
    num = num + rand;
    $('#ver_code').css('visibility', 'visible');
    if ($("#vdimgck")[0]) {
        $("#vdimgck")[0].src = url + "vcode.html?tag=" + num;
    }
    return false;
}

